// src/services/invoiceService.js
import axios from 'axios';

const service = axios.create({
  baseURL: process.env.VUE_APP_BASE_API || '/api',
  timeout: 60000,
  headers: { 'Content-Type': 'application/json' }
});

// 修正接口路径为后端实际提供的路径（例如 /ocr/invoice）
export const uploadAndRecognize = (formData) => {
  return service({
    url: '/ocr/invoice',  // 此处修改为正确路径
    method: 'post',
    data: formData,
    // headers: { 'Content-Type': 'multipart/form-data' }
  });
};
